package com.eyaomall.wxmall.model.vo;

import java.util.Date;

import com.eyaomall.wxmall.model.po.DiscountRecord;
import com.lycheeframework.core.common.util.StringUtil;

public class DiscountRecordVO extends DiscountRecord{

	/**
	 * 
	 */
	private static final long serialVersionUID = 6521791986530143493L;

	
	/**
	 *  0代表失效，1代表生效
	 */
	private String status;


	public String getStatus() {
		if(StringUtil.isEmpty(status)){
			try {
				if(this.getGmtEnd().getTime()>new Date().getTime()&&!"y".equals(this.getClose())){
					status="1";
				}else{
					status="0";
				}
			} catch (Exception e) {
				status="0";
			}
		}
		return status;
	}


	public void setStatus(String status) {
		this.status = status;
	}
}
